<template>
  <div id="app" class="h100">
    <app-view></app-view>
    <navigation @onItemClick="onItemClick"></navigation>
  </div>
</template>
<script>
import AppView from 'components/AppView'
import Navigation from 'components/Navigation'

export default {
  name: 'App',
  components: {
    AppView,
    Navigation
  },
  methods: {
    onItemClick (index) {
      switch(index) {
        case 1:
          this.$router.replace('/1');
          break;
        case 2:
          this.$router.replace('/books/shop');
          break;
        case 3:
          this.$router.replace('/3');
          break;
        case 4:
          this.$router.replace('/4');
          break;
      }
    }
  }
}
</script>

<style lang="stylus">
</style>
